import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";

const routes = [
  {
    path: "/",
    name: "index",
    redirect: "/home",
  },
  {
    path: "/home",
    name: "home",
    component: () => import("@/views/home/home.vue"),
    children: [
      {
        path: '',
        redirect: "/home/recommend"
      },
      {

        path: 'recommend',
        name: 'homeRecommend',
        component: () => import("@/views/home/components/homeRecommend/homeRecommend.vue")
      },
      {
        path: 'playList',
        name: 'homePlayList',
        component:  () => import("@/views/home/components/playListPage/playList.vue")
      }
    ]
  },
  {
    path: "/albumAndSongSheet",
    name: "albumAndSongSheet",
    component: () => import("@/views/albumPage/albumPage.vue"),
  },
];

const router = createRouter({
  routes,
  history: createWebHashHistory(),
});

export default router;
